package com.insideClass.event;

public abstract class Event {
    protected long eventTime;
    protected final long delayTime;

    protected Event(long eventTime, long delayTime) {
        this.eventTime = eventTime;
        this.delayTime = delayTime;
        start();
    }

    public void start(){
        eventTime=System.nanoTime()+delayTime;
    }
    public boolean ready(){
        return System.nanoTime()>=eventTime;
    }
    public abstract void action();
}
